package com.jbh.request.AppApi

import com.jbh.request.i.YxjCallback
import com.jbh.request.request.BaseRequest
import com.jbh.request.response.UserInfoResponse

object AppImpl {


    fun Login(loginName: String, loginPwd: String, callback: YxjCallback<Any>) {
        CommonRequest.commonRequest(Api.Login, BaseRequest(mutableMapOf<String, Any>().apply {
            put("LoginName",loginName)
            put("LoginPassword",loginPwd)
        }).json, Any::class.java, callback)
    }


    /**
     * 用户信息
     */
    fun userInfoTask(callback: YxjCallback<UserInfoResponse>) {
        CommonRequest.commonRequest(
            Api.accountInfo,
            BaseRequest().json,
            UserInfoResponse::class.java,
            callback
        )
    }

    /**
     * 获取banner数据
     */
    fun homeNewsListTask(callback: YxjCallback<Any>) {
        CommonRequest.commonRequest(
            Api.GetHomeNewsList,
            BaseRequest().json,
            Any::class.java,
            callback
        )
    }
}